module.exports = {
	data() {
		return {}
	},
	methods: {
		checkLogin() {
			return this.accessToken
		},
		getPhoneNumberHandler(e) {
			console.log(e)
			// this.$u.api['user/setDyPhone']({mobile: e.code}).then(res => {})
			if (this.afterPhoneNumber) {
				this.afterPhoneNumber(e)
			}
		},
		silentLogin() {
			uni.login({
				provider: 'douyin',
				success: (loginRes) => {
					this.$u.api['user/getTokenByCode']({code: loginRes.code}).then(res => {
						const data = res.data.data
						this.$u.vuex('token', data.token)
						this.initData()
					})
				}
			});
		}

	}
}